import Button from "@/components/demo/Button";
import { defineComponent, ref } from "vue";

/**
 * 通过选项式 API 来使用状态
 */
const IncrButton = defineComponent({
  setup() {
    const count = ref(0);

    const incrCount = () => {
      count.value += 1;
    };

    return () => <Button onClick={incrCount}>count is {count.value}</Button>;
  },
});

export default IncrButton;
